/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jteacher;

import java.awt.*;
import javax.swing.*;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;



/**
 *
 * @author siddhu
 */
public class About {

    private JFrame frame;
    private JButton close;
    private JPanel panel;
    private JLabel heading;
    private JTextArea textArea;

    public About() {
	frame = new JFrame("About");
	close = new JButton("Close");
	panel = new JPanel();
	heading = new JLabel("JTeacher Java Application");
	textArea = new JTextArea();
    }

    public void gui() {

	frame.setVisible(true);
	frame.setPreferredSize(new Dimension(600,400));
	frame.pack();
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	frame.add(panel);
	
	heading.setFont(new Font("Courier", Font.BOLD, 20));

	textArea.setOpaque(false);
	textArea.setEditable(false);
	textArea.setText("JTeacher is a java application that aims at teaching the user several java concepts");

	panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
	panel.add(heading);
	panel.add(textArea);
	panel.add(close);

	close.addActionListener(new ActionListener() {

	    public void actionPerformed(ActionEvent e) {
		frame.setVisible(false);
	    }
	});
    }

}
